home *** CD-ROM | disk | FTP | other *** search
- PXFCREAT(3F) Last changed: 1-22-99
-
-
- NNAAMMEE
- PPXXFFCCRREEAATT - Creates a new file or rewrites an existing file
-
- SSYYNNOOPPSSIISS
- CCHHAARRAACCTTEERR*_n _p_a_t_h
- IINNTTEEGGEERR _i_l_e_n,, _i_m_o_d_e,, _i_f_i_l_d_e_s,, _i_e_r_r_o_r
- CCAALLLL PPXXFFCCRREEAATT((_p_a_t_h,, _i_l_e_n,, _i_m_o_d_e,, _i_f_i_l_d_e_s,, _i_e_r_r_o_r))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- IEEE standard interface for FORTRAN 77
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- F77 compiler.
-
- The PPXXFFCCRREEAATT subroutine uses the ccrreeaatt(2) system call to create a new
- file or rewrite an existing file. The call is similar to PPXXFFOOPPEENN with
- an _i_o_p_e_n_f_l_a_g argument of OO__WWRROONNLLYY, OO__CCRREEAATT, and OO__TTRRUUNNCC.
-
- The value of _i_m_o_d_e indicates specific file modes. If the file exists,
- _i_m_o_d_e is ignored. The mode values are used when _p_a_t_h is a new file.
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
- kind unless documented otherwise. On UNICOS and UNICOS/mk, default
- kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
- IRIX, the default kind is KKIINNDD==44.
-
- The following is a list of valid arguments for this subroutine:
-
- _p_a_t_h An input character variable or array element containing the
- name of a file.
-
- _i_l_e_n An input integer variable containing the length of _p_a_t_h in
- characters. If _i_l_e_n is zero, all trailing blanks are
- removed before calling ccrreeaatt().
-
- _i_m_o_d_e An input integer variable containing the integer value of
- the symbolic constant for one or more of the following file
- modes:
-
- UUSSEERR RREEAADD permissions bit: SS__IIRRUUSSRR
- WWRRIITTEE permissions bit: SS__IIWWUUSSRR
- SSEEAARRCCHH//EEXXEECCUUTTEE permissions bit: SS__IIXXUUSSRR
- Inclusive OORR of RREEAADD//WWRRIITTEE//EEXXEECCUUTTEE: SS__IIRRWWXXUU
-
- GGRROOUUPP RREEAADD permissions bit: SS__IIRRGGRRPP
- WWRRIITTEE permissions bit: SS__IIWWGGRRPP
- SSEEAARRCCHH//EEXXEECCUUTTEE permissions bit: SS__IIXXGGRRPP
- Inclusive OORR of RREEAADD//WWRRIITTEE//EEXXEECCUUTTEE: SS__IIRRWWXXGG
-
- OOTTHHEERR RREEAADD permissions bit: SS__IIRROOTTHH
- WWRRIITTEE permissions bit: SS__IIWWOOTTHH
- SSEEAARRCCHH//EEXXEECCUUTTEE permissions bit: SS__IIXXOOTTHH
- Inclusive OORR of RREEAADD//WWRRIITTEE//EEXXEECCUUTTEE: SS__IIRRWWXXOO
-
- SSEETTIIDD Set user IIDD on execution: SS__IISSUUIIDD
- Set group IIDD on execution: SS__IISSGGIIDD
-
- An integer value for each of these symbolic constants is
- retrieved through the use of PPXXFFCCOONNSSTT or IIPPXXFFCCOONNSSTT. The
- integer values may be combined through the use of a bitwise
- inclusive OORR function.
-
- _i_f_i_l_d_e_s An output integer variable containing the file descriptor
- returned by ccrreeaatt().
-
- _i_e_r_r_o_r An output integer variable that contains zero if the file is
- created or rewritten or nonzero if PPXXFFCCRREEAATT is not
- successful.
-
- In addition to the errors returned by the ccrreeaatt(2) system call,
- PPXXFFCCRREEAATT may return the following errors:
-
- EEIINNVVAALL If _i_l_e_n < 0 or _i_l_e_n > LLEENN((_p_a_t_h))
-
- EENNOOMMEEMM If PPXXFFCCRREEAATT is unable to obtain memory to copy _p_a_t_h
-
- EEXXAAMMPPLLEESS
- program test
- character*(12) path
- integer ilen, imod, ifilde, ierr
- integer imodru, imodwu, imodwg, imodrg
- integer ierr1, ierr2, ierr3, ierr4
- path = 'testfile'
- imod = 0
- ilen = 0
- call pxfconst('S_IRUSR',imodru,ierr1)
- call pxfconst('S_IWUSR',imodwu,ierr2)
- call pxfconst('S_IRGRP',imodrg,ierr3)
- call pxfconst('S_IWGRP',imodwg,ierr4)
- imod = IOR((IOR(imodru,imodwu)),(IOR(imodrg,imodwg)))
- call pxfcreat(path,ilen,imod,ifilde,ierr)
- if (ierr.ne.0) then
- print *,'FAIL: error from pxfcreat = ',ierr
- else
- print *,'PASS: No error from pxfcreat = '
- endif
- end
-
- SSEEEE AALLSSOO
- ccrreeaatt(2), PPXXFFCCOONNSSTT(3F)
-
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
- version of this man page.
-